package com.shuogesha.platform.client;

import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.shuogesha.common.util.JsonResult;
import com.shuogesha.platform.entity.Menu;

@FeignClient(value = "cloudFast-platform-menu")
public interface MenuFeignClient {
	@RequestMapping(value = "/menu/list")
	public Object list(@RequestParam("name") String name, @RequestParam("pageNo") Integer pageNo,
			@RequestParam("pageSize") Integer pageSize);

	@RequestMapping(value = "/menu/get")
	public Object get(@RequestParam("id") Long id);

	@RequestMapping(value = "/menu/save", method = RequestMethod.POST)
	public Object save(@RequestBody Menu bean);

	@RequestMapping(value = "/menu/update", method = RequestMethod.POST)
	public Object update(@RequestBody Menu bean);

	@RequestMapping(value = "/menu/delete")
	public Object delete(Long[] ids);
	
	//其他
	@RequestMapping(value = "/menu/getAllNodes")
	public JsonResult<List<Menu>> getAllNodes(@RequestParam("id") Long id);

	@RequestMapping(value = "/menu/getMenus")
	public List<Menu> getMenus(@RequestParam("pid") Long pid,@RequestParam("type") String type);
}
